﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace Battle
{
    public static class BattleTools
    {
        public static (float dis,float time) GetRepelResult(float repelNum, float targetNum)
        {
            if (targetNum <= 0 || repelNum <= 0) return (0,0);
            float maxDis = 1f, minDis = 0.05f;
            float maxTime = 0.2f, minTime = 0.05f;

            float lerp = Mathf.Clamp(repelNum / targetNum , 0.1f, 1f);

            return (Mathf.Lerp(minDis, maxDis, lerp), Mathf.Lerp(minTime, maxTime, lerp));
        }

    }
}
